package TestAnimal;

public class TestAnimal {
	public static void main(String [] args) {
		Dog d=new Dog("d1","yellow");
		Cat c=new Cat("c1","black");
		Lady l1=new Lady("Lady1",d);
		Lady l2=new Lady("Lady2",c);
		
		l1.petEnjoy(c);
		l2.petEnjoy(d);
	}
}

abstract class Animal {
	String name;
	Animal(String name) {
		this.name=name;
	}
	abstract public void enjoy();
}

class Cat extends Animal {
	String eyeColor;
	Cat(String name,String eyeColor) {
		super(name);
		this.eyeColor=eyeColor;
	}
	public void enjoy() {
		System.out.println("Cat enjoy");
	}
}

class Dog extends Animal { 
	String furColor;
	Dog(String name,String furColor) {
		super(name);
		this.furColor=furColor;
	}
	public void enjoy() {
		System.out.println("Dog enjoy");
	}
}

class Lady {
	String name;
	Animal animal;
	Lady(String name,Animal animal) {
		this.name=name;
		this.animal=animal;
	}
	public void petEnjoy(Animal animal) {
		animal.enjoy();
	}
}